load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
load("//bazel:canisters.bzl", "rust_canister")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "lib",
    testonly = True,
    srcs = ["src/lib.rs"],
    crate_name = "proxy_canister",
    version = "0.1.0",
    deps = [
        # Keep sorted.
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:ic-cdk",
        "@crate_index//:serde",
    ],
)

rust_canister(
    name = "proxy_canister",
    testonly = True,
    srcs = ["src/main.rs"],
    service_file = ":empty.did",
    deps = [
        # Keep sorted.
        ":lib",
        "//rs/types/management_canister_types",
        "@crate_index//:candid",
        "@crate_index//:futures",
        "@crate_index//:ic-cdk",
    ],
)

rust_test(
    name = "proxy_canister_test",
    crate = ":_wasm_proxy_canister",
)
